/*
 * @Author: monet hanxu@huaun.com
 * @Date: 2023-06-07 20:40:34
 * @LastEditors: monet hanxu@huaun.com
 * @LastEditTime: 2023-06-07 20:56:27
 * @FilePath: /vul-ui/src/components/vul-table/src/render.js
 * @Description:
 */
export default {
  name: "RenderCell",
  functional: true,
  props: {
    row: Object,
    render: Function,
    index: Number,
    column: {
      type: Object,
      default: null,
    },
  },
  render: (h, ctx) => {
    const params :any= {
      row: ctx.props.row,
      index: ctx.props.index,
    };
    if (ctx.props.column) params.column = ctx.props.column;
    return ctx.props.render(h, params);
  },
};
